package org.cocos2dx.javascript.admob.AppOpen;

import android.app.Application;

import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.RequestConfiguration;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
import com.logicgame.carmerge.R;

import java.util.Arrays;

/**
 * package:org.cocos2dx.javascript.admob
 * Time:19:56
 * Describe:
 */
public class MyApplication extends Application {
    private static AppOpenManager appOpenManager;
    @Override
    public void onCreate() {
        super.onCreate();
        MobileAds.initialize(
                this,
                new OnInitializationCompleteListener() {
                    @Override
                    public void onInitializationComplete(InitializationStatus initializationStatus) {}
                });
        final String TEST_DEVICE = this.getString(R.string.TEST_DEVICE);
        MobileAds.setRequestConfiguration(
                new RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList(TEST_DEVICE))
                        .build());
        appOpenManager = new AppOpenManager(this);
    }
}
